<template>
  <a-modal
    title="查看"
    :width="640"
    :visible="visible"
    @cancel="() => { visible = false }"
  >
    <template slot="footer">
      <a-button type="primary" @click="visible = false">
        关闭
      </a-button>
    </template>
    <a-form v-bind="formLayout">
      <a-form-item label="关键词">
        {{ model.keyWord }}
      </a-form-item>
      <a-form-item label="创建时间">
        {{ model.createTime }}
      </a-form-item>
      <a-form-item label="回复内容">
        {{ model.replyContent }}
      </a-form-item>
      <a-form-item label="附件">
        <!-- <a :href="model.file?.url" target="_black" :download="model.file?.original">{{ model.file?.original }}</a> -->
        <a @click="$fileDownLoad(model.file)" v-if="model.file">{{ model.file.original }}</a>
      </a-form-item>
    </a-form>
  </a-modal>
</template>

<script>
export default {
  props: {
  },
  data () {
    this.formLayout = {
      labelCol: {
        xs: { span: 24 },
        sm: { span: 7 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 13 }
      }
    }
    return {
      visible: false,
      model: {}
    }
  },
  created () {
  },
  methods: {
    checkView (record) {
      this.visible = true
      this.model = record
    }
  }
}
</script>
